package cn.gcjxsc.service.integral;

import cn.gcjxsc.entity.salesman.SalesmanStoreStatics;
import cn.gcjxsc.repository.salesaman.SalesmanStoreStaticsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author pumbaa
 * @since 1.0
 */
@Service
public class SalesmanStoreStaticsService {
    @Autowired
    private SalesmanStoreStaticsRepository staticsRepository;

    public SalesmanStoreStatics findBySalesmanId(Integer salesmanId){
        return staticsRepository.findBySalesmanId(salesmanId);
    }

    @Transactional
    public SalesmanStoreStatics saveOrUpdateStatics(SalesmanStoreStatics statics){
        return staticsRepository.save(statics);
    }
}
